package com.neuedu.pojo;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class BasePojo {

    @TableId(type = IdType.AUTO)
    private Integer id;

    @JsonIgnore
    @JSONField(serialize = false)
    @TableField(exist = false)
    private Integer pageNo =1;

    @JsonIgnore
    @JSONField(serialize = false)
    @TableField(exist = false)
    private Integer pageSize =6;

    @JsonIgnore
    @JSONField(serialize = false)
    @TableField(exist = false)
    private Integer withPage =1;

    @TableField("active")
    private Integer active;

    @TableField("create_time")
    private LocalDateTime createTime;

    @TableField(value = "update_time", fill = FieldFill.UPDATE)
    private LocalDateTime updateTime;
}
